package com.lagou.client.controller;


import com.lagou.api.pojo.User;
import com.lagou.api.user.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/")
public class UserController {


    @Autowired
    private UserService userService;

    /**
     * 获取用户消息
     * @return
     */
    @RequestMapping("getUser")
    public User getUser(@RequestParam("userCode") String userCode){
        return userService.getUser(userCode);
    };


    /**
     * 获取用户消息
     * @return
     */
    @RequestMapping("updatePassword")
    public void updatePassword(@RequestParam("userCode") String userCode , @RequestParam("password") String password){
         userService.updatePassword(userCode,password);
    };



}
